Readme

This folder contains code and supplementary data for use with the HANDY models and EnKI parameter estimation.

HANDY utilities, including output data structures and the model code itself, are contained in handyfunctions.jl.
handy1_plot_code.ipnyb and handy2_plot_code.ipynb are two Julia notebooks that produce plots for the HANDY scenarios in Chapters 2 and 3.
resource_population_plots.ipynb produces the population and resource plots between 1700 and 2022 featured in Chapter 3.
handy1_parameter_estimation.jl contains the EnKI code for HANDY1 parameter estimation, used in Chapter 5.
handy2_parameter_estimation.jl is used for HANDY2 parameter estimation (Chapter 6).
handy2_ribbon_plots.ipynb produces the Chapter 6 super-ensemble plots.

Data files are provided in comma-separated value format.
resourceusedata.csv and Resource use data.xlsx collate the population and energy data used for HANDY2 plots and EnKI parameter estimation. These files are identical.

In the resource data files:
Population (column B) from 1950 is from UN World Population Prospects. https://population.un.org/wpp/Download/Standard/MostUsed/
Nonrenewables and Renewables data from 1965 onward (column C,D,E,K,L,M,N), as well as production efficiency psi_n (column O) is from the Energy Institute's Statistical Review of World Energy. https://www.energyinst.org/statistical-review
Regenerating data (column H, I) and Nonrenewables/Renewables from before 1965 is from Vaclav Smil's Energy Transitions. https://vaclavsmil.com/2016/12/14/energy-transitions-global-and-national-perspectives-second-expanded-and-updated-edition/
Population before 1950 (column B) is from HYDE. https://landuse.sites.uu.nl/hyde-project/

convergencedata.csv shows EnKI error for 500 iterations of ten HANDY2 parameter estimation runs, used to produce Figure 6.1.
ensembledata.csv shows posterior parameter estimates for 50 HANDY2 parameter estimation runs, used in the Chapter 6 analysis and ensemble plots.